Repunit
In recreational mathematics, a repunit is a number like 11, 111, or 1111 that contains only the digit 1 — a more specific type of repdigit. A repunit prime is a repunit that is also a prime number. In the sections below, R''n'' is the repunit with length n'', e.g. R10 = 111111111111. Repunit prime R''n is known to be prime for n'' = 2, 3, 5, 17, 81, 91, 225, 255, 4X5, and R''n is probable prime for n'' = 5777, 879E, 198E1, 23175, 311407. (Note that 879E is the only known such ''n ends with E) RXE/19E is a X8-digit prime (XE is the only known prime p'' such that R''p/(2''p''+1) is prime). R141 has two 60-digit prime factors, and they are very close. If n'' is composite, then R''n is also composite (e.g. 2E = 5 × 7, and R2E = 11111111111111111111111111111111111 = 11111 × 1000010000100001000010000100001 = 1111111 × 10000001000000100000010000001), however, when n'' is prime, R''n may not be prime, the first counterexample is n=7, although 7 is prime, R7 = 1111111 is not prime, it equals 46E × 2X3E. Theorem If p'' is prime other than E, then every prime factor of R''p is = 1 mod p''. (e.g. both 46E and 2X3E are = 1 mod 7) If ''p is Sophie Germain prime other than 2, 3 and 5, then R''p'' is not prime, since R''p'' must be divisible by 2''p''+1. (e.g. 1E|RE, 3E|R1E, 4E|R25, 6E|R35, 8E|R45, 11E|R6E, 12E|R75, 16E|R95, 19E|RXE) If p'' is prime other than 2, 3 and E, then ''p divides R''p''-1, however, some composite numbers c'' also divide R''c-1, the first such example is 55, which divides R54 For prime p'' other than 2, 3 and E, the smallest integer ''n ≥ 1 such that p'' divides R''n is the period length of 1/''p'', e.g. none of 1, 11, 111, 1111 and 11111 is divisible by 17, but 111111 is, and the period length of 1/17 is 6: 1/17 = 0.076E45 All repunit composite with prime length except RE are Fermat pseudoprime (also Euler pseudoprime, Euler-Jacobi pseudoprime and strong pseudoprime) base 10. If n'' is Fermat pseudoprime base 10, then R''n is also Fermat pseudoprime base 10 (thus, there are infinitely many Fermat pseudoprimes base 10). Factorization of dozenal repunits (Prime factors colored red means "new factors", i.e. the prime factor divides R''n'' but not divides R''k'' for all k'' < ''n) R1 = 1 R2 = 11 R3 = 111 R4 = 5 × 11 × 25 R5 = 11111 R6 = 7 × 11 × 17 × 111 R7 = 46E × 2X3E R8 = 5 × 11 × 25 × 75 × 175 R9 = 31 × 111 × 3X891 RX = 11 × E0E1 × 11111 RE = E × 1E × 754E2E41 R10 = 5 × 7 × 11 × 17 × 25 × 111 × EE01 R11 = 1E0411 × 69X3901 R12 = 11 × 157 × 46E × 2X3E × 7687 R13 = 51 × 111 × 471 × 57E1 × 11111 R14 = 5 × 11 × 15 × 25 × 75 × 81 × 175 × 106X95 R15 = X9X9XE × 126180EE0EE R16 = 7 × 11 × 17 × 31 × 111 × E61 × 1061 × 3X891 R17 = 1111111111111111111 R18 = 52 × 11 × 25 × E0E1 × 11111 × 24727225 R19 = 111 × 46E × 2X3E × E00E00EE0EE1 R1X = E × 11 × 1E × 754E2E41 × E0E0E0E0E1 R1E = 3E × 78935EX441 × 523074X3XXE R20 = 5 × 7 × 11 × 17 × 25 × 75 × 111 × 141 × 175 × EE01 × 8E5281 R21 = 11111 × 1277EE × 9X06176590543EE R22 = 112 × 67 × 18X31 × X8837 × 1E0411 × 69X3901 R23 = 31 × 111 × 3X891 × 129691 × 9894576430231 R24 = 5 × 11 × 25 × 157 × 46E × 481 × 2X3E × 7687 × 2672288X41 R25 = 4E × 123EE × 15960E × 160605E10497012E4E R26 = 7 × 11 × 17 × 27 × 51 × 111 × 2E1 × 471 × 57E1 × E0E1 × 11111 × 18787 R27 = 271 × 365E0031 × 464069563E × 39478E3664E R28 = 5 × 11 × 15 × 25 × 75 × 81 × 175 × 75115 × 106X95 × 1748E3674115 R29 = E × 1E × 111 × 368E51 × 2013881 × 754E2E41 × 16555E1X1 R2X = 11 × 1587 × X9X9XE × 126180EE0EE × 7605857409257 R2E = 5E × 34E × 46E × 2X3E × 11111 × 32XXE1 × 205812E × EX59849E R30 = 5 × 7 × 11 × 17 × 25 × 31 × 61 × 111 × E61 × 1061 × EE01 × 3X891 × 1E807X62E61 R31 = 1398641 × 9E2X6732EE74552406X78E76247691 R32 = 11 × 1XE7 × 4901 × 127543624027 × 1111111111111111111 R33 = 111 × 19491 × 1E0411 × 5XE48X1 × 69X3901 × 1064119E745041 R34 = 52 × 11 × 25 × 35 × 75 × 175 × 375 × E0E1 × 11111 × 62041 × 1X7X9741 × 24727225 R35 = 6E × 472488E21 × 4E2EX47X7863X18E5E18253377315E R36 = 72 × 11 × 17 × 37 × 111 × 157 × 46E × 2X3E × 7687 × 9X17 × 76E077 × E00E00EE0EE1 R37 = 2EE × 4159911 × 273263674E × 4X748X0X65EXX3943375X351 R38 = 5 × E × 11 × 1E × 25 × 1461 × 2181 × 3801 × 754E2E41 × E0E0E0E0E1 × 113006390X1 R39 = 31 × 51 × 111 × 471 × 57E1 × 11111 × 15991 × 3X891 × 1905201 × 7229231 × 7843701 R3X = 11 × 3E × 591 × 7231 × 78935EX441 × 523074X3XXE × 3266712021E531E1 R3E = 832966217X8X111 × 16EE6202E02X5311278504010EX13001 R40 = 5 × 7 × 11 × 15 × 17 × 25 × 75 × 81 × 111 × 141 × 175 × 4541 × EE01 × 1E601 × 106X95 × 8E5281 × 146609481 In fact, the repunit R''n'' = Π''d''|''n'', d''>1(Φ''d(10)), where Φ''d''(10) is the d''th cyclotomic polynomial evaluated at 10. Properties * Any positive multiple of the repunit ''Rn contains at least n'' nonzero digits. * The only known numbers that are repunits with at least 3 digits in more than one base simultaneously are 27 (111 in base 5, 11111 in base 2) and 48X7 (111 in base 76, 1111111111111 in base 2). The Goormaghtigh conjecture says there are only these two cases. * Using the pigeon-hole principle it can be easily shown that for each ''n and b'' such that ''n and b'' are relatively prime there exists a repunit in base ''b that is a multiple of n''. To see this consider repunits ''R''1(''b),...,Rn(b''). Because there are ''n repunits but only n''-1 non-zero residues modulo ''n there exist two repunits Ri(b'') and ''Rj(b'') with 1≤''i<''j''≤''n'' such that Ri(b'') and ''Rj(b'') have the same residue modulo ''n. It follows that Rj(b'') - ''Ri(b'') has residue 0 modulo ''n, i.e. is divisible by n''. ''Rj(b'') - ''Ri(b'') consists of ''j - i'' ones followed by ''i zeroes. Thus, Rj(b'') - ''Ri(b'') = ''Rj-''i''(b'') x ''bi . Since n'' divides the left-hand side it also divides the right-hand side and since ''n and b'' are relatively prime ''n must divide Rj-''i''(b''). * The Feit–Thompson conjecture is that ''Rq(p'') never divides ''Rp(q'') for two distinct primes ''p and q''. * Using the Euclidean Algorithm for repunits definition: ''R''1(''b) = 1; Rn(b'') = ''Rn-1(b'') x ''b + 1, any consecutive repunits Rn-1(b'') and ''Rn(b'') are relatively prime in any base ''b for any n''. * If ''m and n'' are relatively prime, ''Rm(b'') and ''Rn(b'') are relatively prime in any base ''b for any m'' and ''n. The Euclidean Algorithm is based on gcd(m'', ''n) = gcd(m'' - ''n, n'') for ''m > n''. Similarly, using ''Rm(b'') - ''Rn(b'') × ''bm-''n'' = Rm-''n''(b''), it can be easily shown that ''gcd(Rm(b''), ''Rn(b'')) = ''gcd(Rm-''n''(b''), ''Rn(b'')) for ''m > n''. Therefore if ''gcd(m'', ''n) = 1, then gcd(Rm(b''), ''Rn(b'')) = ''R''1(''b) = 1. * The remainder of Rn(10) modulo E is equal to the remainder of n'' modulo E. * Repunits in base 10 are related the cyclic patterns of repeating dozenals, it was found very early on that for any prime ''p greater than 3 except E, the period of the dozenal expansion of 1/''p'' is equal to the length of the smallest repunit number that is divisible by p''. * The only one repunit prime in base 4 is 5 (=114). * The only one repunit prime in base 8 is 61 (=1118). * The only one repunit prime in base 14 is 15 (=1114). * The only one repunit prime in base 23 is 531 (=11123). * The only one repunit prime in base 30 is 31 (=1130). * The only one repunit prime in base 84 is 85 (=1184). * The only one repunit prime in base X8 is 5E70EX5X8801 (=1111111X8). * There are no repunit primes in base 9, 21, 28, 41, 54, 69, X1, X5, 100, ..., because of algebraic factors. Especially, all repunits in base 9 are triangular numbers. * Every perfect power base has at most one generalized repunit prime (since generalized repunits in these bases can be factored algebraically), and it is conjectured every non-perfect power base has infinitely many generalized repunit primes (there is at least one known repunit prime or repunit PRP with length < 3000 for ''all non-perfect power bases 2<=b<=100, and except base 43 (=3*15) and base 77 (=7*11), all other non-perfect power bases 2<=b<=100 have at least one known proven repunit prime with length < 1000, besides, base 43 and base 77 also have one known repunit PRP with length < 3000, (43^2545-1)/42 and (77^2685-1)/76. List of repunit primes base b We also consider “negative primes” (e.g. R2(-10) = -E) as primes, since they are primes in the domain Z (the set of all integers). Category:Pages